<?php
/**
 * 版本:酷享云支付3.0版
 * 作者：余生
 * 官网：www.kuxiangcms.com
 * 技术QQ：2316803263
 * 酷享云支付官网:pay.kuxiangcms.cn
**/
//费率修改
include("../includes/common.php");
include './head.php';
if ($islogin == 1) {
} else {
    exit("<script language='javascript'>window.location.href='./login.php';</script>");
}
?>
<?php
if(isset($_POST['submit'])) {
    foreach ($_POST as $k => $value) {
        if($k=='pwd')continue;
        $value=daddslashes($value);
        $DB->query("insert into pay_config set `k`='{$k}',`v`='{$value}' on duplicate key update `v`='{$value}'");
    }
    exit("<script language='javascript'>alert('修改成功！');window.location.href='./felv.php';</script>");
}
?>
<div class="x-nav">
          <span class="layui-breadcrumb">
           <a>
              首页</a>
            <a>
              <cite>结算与支付费率设置</cite></a>
          </span>
          <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
            <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i></a>
        </div>

  <div class="layui-tab page-content-wrap layui-card">
      <ul class="layui-tab-title">
        <li class="layui-this">费率设置</li>
        <li>结算费率设置</li>
        <li>商户配置</li>
        <li>商品说明配置</li>
      </ul>
      <div class="layui-tab-content">
        <!--站点配置-->
        <div class="layui-tab-item layui-show">
          <form class="layui-form" action="" method="post" style="width: 90%;padding-top: 20px;">

          <div class="layui-form-item">
              <label class="layui-form-label">普通会员支付宝费率：</label>
              <div class="layui-input-inline">
                <input type="text"  autocomplete="off" required="" class="layui-input" name="money_rate_alipay" value="<?php echo $conf['money_rate_alipay']; ?>">
              </div>
              <div class="layui-form-mid layui-word-aux">*默认支付分成比例（百分数） 例如：97 = 收取3%的费率</div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">普通会员微信费率：</label>
              <div class="layui-input-inline">
                <input type="text"  autocomplete="off" required="" class="layui-input" name="money_rate_wxpay" value="<?php echo $conf['money_rate_wxpay']; ?>">
              </div>
              <div class="layui-form-mid layui-word-aux">*默认支付分成比例（百分数） 例如：97 = 收取3%的费率</div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">普通会员Q&nbsp;Q费率：</label>
              <div class="layui-input-inline">
                <input type="text"  autocomplete="off" required="" class="layui-input" name="money_rate_qqpay" value="<?php echo $conf['money_rate_qqpay']; ?>">
              </div>
              <div class="layui-form-mid layui-word-aux">*默认支付分成比例（百分数） 例如：97 = 收取3%的费率</div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">黄金会员费率：</label>
              <div class="layui-input-inline">
                <input type="text" name="money_rate_vip" required="" value="<?php echo $conf['money_rate_vip']; ?>" autocomplete="off" class="layui-input">
              </div>
              <div class="layui-form-mid layui-word-aux">*默认支付分成比例（百分数） 例如：97 = 收取3%的费率</div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">钻石会员费率：</label>
              <div class="layui-input-inline">
                <input type="text" required="" lay-verify="required" placeholder="请输入联系邮箱" autocomplete="off" class="layui-input" name="money_rate_svip" value="<?php echo $conf['money_rate_svip']; ?>">
              </div>
               <div class="layui-form-mid layui-word-aux">*默认支付分成比例（百分数） 例如：97 = 收取3%的费率</div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">黄金会员包月价格：</label>
              <div class="layui-input-inline">
                <input type="text" name="level_vip" required="" lay-verify="required" placeholder="请输入黄金会员包月价格" autocomplete="off" class="layui-input" value="<?php echo $conf['level_vip']; ?>">
              </div>
              <div class="layui-form-mid layui-word-aux">*从普通会员升级到黄金会员的包月价格</div>
            </div>
           <!--  <div class="layui-form-item">
              <label class="layui-form-label">普通升级钻石包月价格:</label>
              <div class="layui-input-inline">
                <input type="text" name="level_vip_year" required lay-verify="required" placeholder=" " autocomplete="off" class="layui-input" value="<?php echo $conf['level_vip_year']; ?>">
              </div>
              <div class="layui-form-mid layui-word-aux">*从普通会员升级到钻石会员的包月价格</div>
            </div>-->
            <div class="layui-form-item">
              <label class="layui-form-label">钻石会员月费升级价格：</label>
              <div class="layui-input-inline">
                <input type="text" name="level_svip" required lay-verify="required" placeholder="请输入钻石会员月费升级价格" autocomplete="off" class="layui-input" value="<?php echo $conf['level_svip']; ?>">
              </div>
               <div class="layui-form-mid layui-word-aux">*从黄金会员升级到石会员的包月价格</div>
            </div>
             <div class="layui-form-item">
              <label class="layui-form-label">支付限额设置：</label>
              <div class="layui-input-inline">
                <input type="text" name="key_jine" required lay-verify="required" placeholder="请输入限额数" autocomplete="off" class="layui-input" value="<?php echo $conf['key_jine']; ?>">
              </div>
               <div class="layui-form-mid layui-word-aux">*假如1000，那当商户使用支付调用单笔金额超1000 直接会被拦截提示单笔金额超限制</div>
            </div>
           

            <div class="layui-form-item">
              <div class="layui-input-block">
              <input type="submit" name="submit" value="保存修改" class="layui-btn layui-btn-normal "/>
              </div>
            </div>
          </form>
        </div>
           
            
        <!--结算设置-->
        <div class="layui-tab-item">
           <form class="layui-form" action="" method="post" style="width: 90%;padding-top: 20px;">
            <div class="layui-form-item">
              <label class="layui-form-label">自动结算：</label>
              <div class="layui-input-inline">
                <input type="text" name="settle_money" placeholder="请输入自动结算金额" autocomplete="off" class="layui-input" value="<?php echo $conf['settle_money']; ?>">
              </div>
              <div class="layui-form-mid layui-word-aux">*每天满多少元自动结算</div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">结算费率：</label>
              <div class="layui-input-inline">
                <input type="text" name="settle_rate" placeholder="请输入结算费率" autocomplete="off" class="layui-input" value="<?php echo $conf['settle_rate']; ?>">
              </div>
              <div class="layui-form-mid layui-word-aux">* 1 = 1%(100:1)</div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">手续费最少：</label>
              <div class="layui-input-inline">
                <input type="text" name="settle_fee_min" placeholder="请输入手续费最少金额" autocomplete="off" class="layui-input" value="<?php echo $conf['settle_fee_min']; ?>">
              </div>
              <div class="layui-form-mid layui-word-aux">* 结算手续费最小</div>
            </div>



             <div class="layui-form-item">
              <label class="layui-form-label">手续费最大：</label>
              <div class="layui-input-inline">
                <input type="text" name="settle_fee_max" placeholder="请输入手续费最大金额" autocomplete="off" class="layui-input" value="<?php echo $conf['settle_fee_max']; ?>">
              </div>
              <div class="layui-form-mid layui-word-aux">* 结算手续费最大</div>
            </div>


             <div class="layui-form-item">
              <label class="layui-form-label">微信企业付款：</label>
              <div class="layui-input-inline">
                <input type="text" name="wxtransfer_desc" placeholder="请输入微信企业付款名称" autocomplete="off" class="layui-input" value="<?php echo $conf['wxtransfer_desc']; ?>">
              </div>
              <div class="layui-form-mid layui-word-aux">* 付款说明</div>
            </div>
             <div class="layui-form-item">
              <label class="layui-form-label">付款方显示姓名：</label>
              <div class="layui-input-inline">
                <input type="text" name="payer_show_name" placeholder="请输入付款方姓名" autocomplete="off" class="layui-input" value="<?php echo $conf['payer_show_name']; ?>">
              </div>
              <div class="layui-form-mid layui-word-aux">* 单笔转账到支付宝接口</div>
            </div>

            <div class="layui-form-item">
              <label class="layui-form-label">支付宝应用APPID:</label>
              <div class="layui-input-inline">
                <input type="text" name="alipay_appid" placeholder="请输入应用APPID" autocomplete="off" class="layui-input" value="<?php echo $conf['alipay_appid']; ?>">
              </div>
              <div class="layui-form-mid layui-word-aux">* 企业合作者支付宝应用APPID</div>
            </div>

             <div class="layui-input-inline layui-form-item layui-show-xs-block">
                       <label class="layui-form-label">开启申请结算：</label>
                                <div class="layui-input-block">
                                 <select  class="form-control" name="settle_open">
                  <option value="1" <?=$conf['settle_open']==1?"selected":""?> >开启</option>
                   <option value="0" <?=$conf['settle_open']==0?"selected":""?> >关闭</option>
              </select>  
              </div>
               <div class="layui-form-mid layui-word-aux">* 是否开启用户中心手动申请结算</div>
              </div>
           
       
        
            <div class="layui-form-item">
              <div class="layui-input-block">
                <input type="submit" name="submit" value="保存修改" class="layui-btn layui-btn-normal "/>
              </div>
            </div>
          </form>
        </div>

        <!--商户设置-->
        <div class="layui-tab-item">
           <form class="layui-form" action="" method="post" style="width: 90%;padding-top: 20px;">
           
             <div class="layui-input-inline layui-form-item layui-show-xs-block">
                       <label class="layui-form-label">开启商户注册：</label>
                                <div class="layui-input-block">
                                <select  class="form-control" name="is_reg">
                  <option value="1" <?=$conf['is_reg']==1?"selected":""?> >开启</option>
                   <option value="0" <?=$conf['is_reg']==0?"selected":""?> >关闭</option>
              </select>
              </div>
              </div>
               <div class="layui-input-inline layui-form-item ">
                       <label class="layui-form-label">免费商户注册：</label>
                                <div class="layui-input-block">
                                <select  class="form-control" name="is_payreg">
                  <option value="0" <?=$conf['is_payreg']==0?"selected":""?> >开启</option>
                   <option value="1" <?=$conf['is_payreg']==1?"selected":""?> >关闭</option>
              </select>
              </div>
              </div>
              <div class="layui-input-inline layui-form-item layui-show-xs-block">
                       <label class="layui-form-label">开启商户排行榜：</label>
                                <div class="layui-input-block">
                                <select  class="form-control" name="ranking">
                  <option value="1" <?=$conf['ranking']==1?"selected":""?> >开启</option>
                   <option value="0" <?=$conf['ranking']==0?"selected":""?> >关闭</option>
              </select>
              </div>
              </div>
               <div class="layui-input-inline layui-form-item layui-show-xs-block">
                       <label class="layui-form-label">商户转账功能：</label>
                                <div class="layui-input-block">
                                <select  class="form-control" name="usera">
                  <option value="1" <?=$conf['usera']==1?"selected":""?> >开启</option>
                   <option value="0" <?=$conf['usera']==0?"selected":""?> >关闭</option>
              </select>
              </div>
              </div>
              <div class="layui-input-inline layui-form-item layui-show-xs-block">
                       <label class="layui-form-label">邀请功能：</label>
                                <div class="layui-input-block">
                                <select  class="form-control" name="invite">
                  <option value="1" <?=$conf['invite']==1?"selected":""?> >开启</option>
                   <option value="0" <?=$conf['invite']==0?"selected":""?> >关闭</option>
              </select>
              </div>
              </div>
               <div class="layui-input-inline layui-form-item layui-show-xs-block">
                       <label class="layui-form-label">申请验证方式：</label>
                                <div class="layui-input-block">
                               <select  class="form-control" name="verifytype">
                  <option value="1" <?=$conf['verifytype']==1?"selected":""?> >手机验证</option>
                   <option value="0" <?=$conf['verifytype']==0?"selected":""?> >邮箱验证</option>
              </select>
              </div>
              </div><br>

               <div class="layui-input-inline layui-form-item layui-show-xs-block">
                       <label class="layui-form-label">支付宝结算：</label>
                                <div class="layui-input-block">
                               <select  class="form-control" name="stype_1">
                  <option value="1" <?=$conf['stype_1']==1?"selected":""?> >开启</option>
                   <option value="0" <?=$conf['stype_1']==0?"selected":""?> >关闭</option>
              </select>
              </div>
              </div>

                <div class="layui-input-inline layui-form-item layui-show-xs-block">
                       <label class="layui-form-label">微信结算：</label>
                                <div class="layui-input-block">
                                <select  class="form-control" name="stype_2">
                  <option value="1" <?=$conf['stype_2']==1?"selected":""?> >开启</option>
                   <option value="0" <?=$conf['stype_2']==0?"selected":""?> >关闭</option>
              </select>
              </div>
              </div>

              <div class="layui-input-inline layui-form-item layui-show-xs-block">
                       <label class="layui-form-label">QQ钱包结算：</label>
                                <div class="layui-input-block">
                                 <select  class="form-control" name="stype_3">
                  <option value="1" <?=$conf['stype_3']==1?"selected":""?> >开启</option>
                   <option value="0" <?=$conf['stype_3']==0?"selected":""?> >关闭</option>
              </select>
              </div>
              </div>
               <div class="layui-input-inline layui-form-item ">
                       <label class="layui-form-label">银行卡结算：</label>
                                <div class="layui-input-block">
                                <select  class="form-control" name="stype_4">
                  <option value="1" <?=$conf['stype_4']==1?"selected":""?> >开启</option>
                   <option value="0" <?=$conf['stype_4']==0?"selected":""?> >关闭</option>
              </select>
              </div>
              </div>
           <div class="layui-form-item">
              <label class="layui-form-label">收款商户ID：</label>
              <div class="layui-input-inline">
                <input type="text" name="reg_pid" placeholder="请输入收款商户ID" autocomplete="off" class="layui-input" value="<?php echo $conf['reg_pid']; ?>">
              </div>
              <div class="layui-form-mid layui-word-aux">* 付费申请收款商户ID</div>
            </div>

            <div class="layui-form-item">
              <label class="layui-form-label">商户申请价格：</label>
              <div class="layui-input-inline">
                <input type="text" name="reg_price" placeholder="请输入申请价格金额" autocomplete="off" class="layui-input" value="<?php echo $conf['reg_price']; ?>">
              </div>
              <div class="layui-form-mid layui-word-aux">* 付费商户申请价格</div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">邀请返利佣金：</label>
              <div class="layui-input-inline">
                <input type="text" name="invite_money" placeholder="请输入返佣金额" autocomplete="off" class="layui-input" value="<?php echo $conf['invite_money']; ?>">
              </div>
              <div class="layui-form-mid layui-word-aux">* 友情提示；返佣金额不得大于申请价格【假设设置1元则商户每邀请成功一个将得您设置的佣金额度】</div>
            </div>
        
            <div class="layui-form-item">
              <div class="layui-input-block">
                <input type="submit" name="submit" value="保存修改" class="layui-btn layui-btn-normal "/>
              </div>
            </div>
          </form>
        </div>

    
        
        <div class="layui-tab-item">
          <form class="layui-form" action="" method="post" style="width: 90%;padding-top: 20px;">
           <div class="layui-form-item">
              <label class="layui-form-label">支付宝商品说明：</label>
              <div class="layui-input-block">
                <input type="text"  autocomplete="off" required="" class="layui-input" name="zfb_instructions" value="<?php echo $conf['zfb_instructions']; ?>">
              </div>
              <div class="layui-form-mid layui-word-aux">*商品说明指的是用户扫码支付显示在付款时的商品说明</div>
            </div>

          <div class="layui-form-item">
              <label class="layui-form-label">微信支付商品说明：</label>
              <div class="layui-input-block">
                <input type="text"  autocomplete="off" required="" class="layui-input" name="wx_instructions" value="<?php echo $conf['wx_instructions']; ?>">
              </div>
              <div class="layui-form-mid layui-word-aux">*商品说明指的是用户扫码支付显示在付款时的商品说明</div>
            </div>
              
               <div class="layui-form-item">
              <label class="layui-form-label">QQ支付商品说明：</label>
              <div class="layui-input-block">
                <input type="text"  autocomplete="off" required="" class="layui-input" name="qq_instructions" value="<?php echo $conf['qq_instructions']; ?>">
              </div>
              <div class="layui-form-mid layui-word-aux">*商品说明指的是用户扫码支付显示在付款时的商品说明</div>
            </div>
         
            <div class="layui-form-item">
              <div class="layui-input-block">
              <input type="submit" name="submit" value="保存修改" class="layui-btn layui-btn-normal "/>
              </div>
            </div>
          </form>
        </div>
       
      </div>
    </div>
  <!--请勿盗卖酷享云支付源码程序 ，如发现盗卖将不提供更新服务，系统由余生网络信息提供技术服务-->
<script>
//Demo
layui.use('form', function(){
  var form = layui.form;
  

});
</script>